
def run(params:list[str]):
    from ApiTools import apiBase,apiTools
    vectdb = apiTools.load_vec()
    collect = apiBase.argv(params,1,"proc/extract/tablename")
    #print("collect="+collect)
    q = apiBase.argv(params,2,"hostname(111)")
    a = apiBase.argv(params,3,"host_name(111)")
    key = apiBase.argv(params,4,'')
    fun_name = apiBase.argv(params,5,'qa')
    #key="%DATEDIFF%;%datediff%"
    #print("collect="+collect)
    vectdb.train_QA(collect_name=collect,question=q,sql=a,key=key,fun_name=fun_name)
    return "load qa ok"
    #vct=apiModels.get_vect(name=collect)
    #vectdb.fixQA([vct],"You are an assistant",q,None)

#run([])